package com.hyz.login.mapper;

import com.hyz.login.model.Pay;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zwq
 * @since 2022-11-29
 */
public interface PayMapper extends BaseMapper<Pay> {

    List<Pay> findAll(@Param("registerid") Integer registerid,
                      @Param("page") Integer page,
                      @Param("limit") Integer limit);

    @Insert("insert into pay(registerid,money,payDate)" +
            "values(#{registerid},#{money},NOW())")
    Integer addPay(@Param("registerid") Integer registerid,
                   @Param("money") Integer money);

}
